﻿using Ivory;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Ivory.GUI;
using Ivory.Libs;
using X13.Player;
using X13.Mapping;
using X13.Libs;
using X13;

namespace Sweeper
{
    using XGlobals = X13.Globals;
    

    public class RenderTest01 : RenderTestBase
    {
        public static string Key = "~RT01nm";
        
        //Fields
        private MineTile _MineTile;
        private MineTile _MineTile2;

        //Construct
        public RenderTest01(Game game)
            : base(game)
        {

        }

        //Methods 
        public override void RenderTest(SpriteBatch batch, GameTime time)
        {
            _MineTile.RenderCell();
            _MineTile2.RenderCell();
        }

        public override void UpdateTest(GameTime time, InputControl input)
        {
            _MineTile.UpdateCell(time);
        }

        public override void LoadTest()
        {
            _MineTile = new MineTile(new MinefieldPosition(0, 0));
            _MineTile2 = new MineTile(new MinefieldPosition(1, 0));

            SelectionEngine.Clear();
            SelectionEngine.Register(_MineTile);
            SelectionEngine.Register(_MineTile2);
        }
    }
}
